package com.singzi.leetcode.N1000;

import java.util.HashSet;

public class T0929 {
}
class Solution0929 {
    public int numUniqueEmails(String[] emails) {
        HashSet<String> set = new HashSet<>();
        for(String email:emails){
            int i = email.indexOf('@');
            String s1 = email.substring(0, i).split("\\+")[0];
            s1 = s1.replace(".", "");
            set.add(s1 + email.substring(i));
        }
        return set.size();

    }
}